#include<bits/stdc++.h>
#define gc getchar
#define itn int
#define x first
#define y second
#define eb emplace_back
#define em emplace
#define pb push_back
#define db double
#define y1 yy1_yyds
using namespace std; typedef long long ll; typedef unsigned long long ull;
// https://www.luogu.com.cn/discuss/522581 About "const"
ll read() {
	ll x = 0; short fh = 1; char ch = gc();
	while (!isdigit(ch)) {
		if (ch == '-') fh = -1;
		if (ch < 10) exit(0); 
		ch = gc();
	}
	while (isdigit(ch))
		x = x * 10 + (ch ^ 48), ch = gc();
	return fh * x;
}
#ifndef ONLINE_JUDGE
void debug() {cerr << "\n";}
template<typename Typ1> void debug(Typ1 arg) {cerr << arg << "\n";}
template<typename Typ1, typename ...Typ2> void debug(Typ1 arg, Typ2 ...args) {
	cerr << arg << " ", debug(args...);
}
#else
void debug() {}
template<typename Typ1> void debug(Typ1 arg) {}
template<typename Typ1, typename ...Typ2> void debug(Typ1 arg, Typ2 ...args) {}
#endif
void writeln(ll arg) {printf("%lld\n", arg);}
template<typename ...Typ2> void writeln(ll arg, Typ2 ...args) {
	printf("%lld ", arg), writeln(args...);
}
typedef pair <int, int> pii; typedef pair <ll, ll> pll;
const char Y_E_S[] = "YES", N__O[] = "NO";
// const char Y_E_S[] = "Yes", N__O[] = "No";
// #define infinite_testcase
// #define multiple_testcase
// #define output_Yes_No
const int DUST = 327, N = 1145810, M = -1;
double r[N]; int n;
db solve1() {
	db ans = 0, u = 0;
	ans = r[1] + 0.25;
	u = 1.5;
	for(int i = 2; i <= n; i += 2) {
		ans = max(ans, r[i] + u/**/* u);//r[i] >= r[i + 1]
		//啊？直接写 r[i] + u 可以过样例 2？？？？？
		u += 1;
	}
/**/return ans;
}
db solve2() {
	db ans = 0, u = 0;
	u = 1;
	// debug("n = ", n);
	for(int i = 1; i <= n; i += 2) {
		ans = max(ans, r[i] + u * u);
		u += 1;
		// debug(i, u, ans);
	}
	return ans;
}
db chkl(db u) {
	db sqru = u * u;//少点浮点乘法常数？
	db ans = r[1] + sqru;
	for(int i = 2; i <= n; i += 2) sqru += u + u + 1, u += 1, ans = max(ans, r[i] + sqru);
	return ans;
}
db chkr(db v) {
	db sqrv = v * v, ans = r[1] + sqrv;
	for(int i = 3; i <= n; i += 2) sqrv += v + v + 1, v += 1, ans = max(ans, r[i] + sqrv);
	return ans;
}
db db_read() {
	ll x = 0; char ch = gc();
	while (!isdigit(ch)) ch = gc();
	while (isdigit(ch))
		x = x * 10 + (ch ^ 48), ch = gc();
	assert(ch == '.');
	db y = x, f = 1;
	while(isdigit(ch = gc())) f /= 10, y += f * (ch ^ 48);
	return y;
}
bool major(int Case = 1) {
	/*int */n = read(); // md
	for(int i = 1; i <= n; i++) {
		double a, b;
		//scanf("%lf%lf", &a, &b); // ? 为什么 scanf 这么慢 还好手造了一组 1e6 的数据才发现/jk
		a = db_read(), b = db_read();
		if(a < b) swap(a, b);
		a /= 2;
		r[i] = a * a + b * b;
		// debug(r[i]);
	}
	sort(r + 1, r + n + 1, greater<db>());
	// db ans = 1e18, u = 0;
	// if(n & 1) {
		// ans = solve1();
	// }
	// debug(ans);
	// else {
		// ans = min(ans, solve2());
	// }
	// debug(ans);
	// debug(clock());
	db l = 0, r = 1;
	//double 最多可精确到 17 位有效数字左右
	while((abs(r - l) >= /*1e-9*/1e-16) && (clock() / (db)CLOCKS_PER_SEC) <= 0.9) {
		db mid = (l + r) / 2;
		if(chkl(mid) > chkr(1 - mid))
			r = mid;
		else
			l = mid;
		// debug(l, r, clock());
	}
	//手造数据中，clock() 从 486 到 533，证明二分还是很快的！
	// 精度改成 1e-16 之后时间变成了 652 到 832（关了 O2）
	// ？精度太高 样例2 死循环了？ 没事有 clock 保护，不会T 的，放心
	db mid = (l + r) / 2, ans = max(chkl(mid), chkr(1 - mid));
	printf("%.10lf\n", sqrt(ans));
	return Case ^= Case ^ Case;
}
void initial_function(int argc, char **argv) {
	**argv = argc; /* <- place_holder
	you won't give up no matter what happens, will you?
	code time: 7:40 >> 9:42（写完了） >> 10:07 （测试完了）
	---
	草。
	懒得写对拍了/oh，因为暴力（枚举 x）精度不够。
	*/
	freopen("temple.in", "r", stdin);
	freopen("temple.out", "w", stdout);
}
signed main(int argc, char **argv) {
	initial_function(argc, argv);
	int Case = 1, Maxcase = 1;
	for (
#ifdef multiple_testcase
		  Maxcase = read()
#endif
				     	  ;
#ifndef infinite_testcase
							Case <= Maxcase
#endif
				     					   ; Case++)
#ifdef output_Yes_No
		puts(major(Case) ? Y_E_S : N__O);
#else
		major(Case);
#endif
	return DUST ^ 0x147;
}
